fix: repoint MCP output-schemas import to kernel/device (unbreak main)#943
Conversation
#941 (MCP outputSchema) and #940 (errors/redaction/device -> src/kernel) merged in an order where #940's import codemod never saw #941's new command-output-schemas.ts, so it still imports '../utils/device.ts' — which no longer exists. tsc/build on main is red. Repoint the import at '../kernel/device.ts'. The only stale reference on main.
|
Reviewed current head I checked the PR diff and swept for remaining stale The Bundle Size check is failing while measuring the base commit |
|
…ase 4 (#942) * feat: leveled response views + --level knob, with a snapshot digest — Phase 4 Add the agent-cost leveled-response system: a responseLevel knob (digest | default | full) plumbed end to end behind a global --level flag (mirroring --cost), and a per-command ResponseView registry applied in the router on the success path. - contracts: RESPONSE_LEVELS/ResponseLevel + meta.responseLevel + boundary schema whitelist. Plumbing mirrors --cost: cli-flags FlagDefinition + GLOBAL_FLAG_KEYS, AgentDeviceClientConfig + overrides, buildClientConfig, buildMeta. ResponseLevel exported from the public root. - src/daemon/response-views.ts: the ResponseView registry. Seeds the snapshot digest — the full node tree (the dominant token sink) collapses to { nodeCount, refs: first 12 hittable/non-occluded refs with labels } plus the cheap top-level signals (truncated/visibility/snapshotQuality). full returns today's shape (nothing richer is computed yet). - router graft (applyResponseLevelView + applyAgentCostGrafts): composes with the existing cost block. With responseLevel default (or unset) AND no registered view AND no --cost, the original response is returned UNCHANGED — byte-identical to today (Maestro .ad recompare safe). cost.nodeCount reads the original node tree so it stays accurate even after a digest. Tests: snapshot view unit test (digest filters hittable/occluded, drops the tree, keeps cheap signals; default/full passthrough); router graft test via an injected view (default identity byte-identical, digest applies, full passthrough, digest+cost composition, unregistered-command passthrough, boundary parse). Verified: tsc, oxfmt + oxlint --deny-warnings, fallow audit clean, rslib build, Layering Guard empty, 1106 daemon/contracts/client tests pass (incl. the existing cost/typed-error grafts after the restructure). * fix: repoint MCP output-schemas import to kernel/device (rebase fixup) The kernel move (#940) deleted src/utils/device.ts; #941's command-output-schemas.ts (merged after #940's codemod ran) still imported the old path. Same one-line fix as #943; de-dups once that lands. * fix: re-classify responseLevel flag in integration-progress model The --level/responseLevel flag is a diagnostics/output flag (not device- observable), classified in the exclusion bucket alongside --cost. (Lost in an earlier rebase; re-applying.)
main is currently red. #941 (MCP
outputSchema) and #940 (moveerrors/redaction/device→src/kernel/) merged in an order where #940's import-rewrite codemod ran before #941's newsrc/mcp/command-output-schemas.tsexisted — so that file still imports../utils/device.ts, which #940 deleted. tsc/build fail onmain.One-line fix:
../utils/device.ts→../kernel/device.ts. Swept the tree — this is the only staleutils/{device,errors,redaction}import remaining.Verified:
tsc --noEmit0,oxlint --deny-warningsclean,vitest run src/mcppass.